//  获取
import request from '@/utils/request'
export function getagents(params) {
  return request({
    method: 'get',
    url: '/agents',
    params
  })
}
// 获取单个信息
export function Oneagents(id) {
  return request({
    method: 'get',
    url: `/agents/${id}`
  })
}
// 新增
export function Addagents(data) {
  return request({
    method: 'post',
    url: '/agents',
    data
  })
}
// 删除
export function delagents(id) {
  return request({
    method: 'delete',
    url: `/agents/${id}`
  })
}
// 获取总数
export function AgentCount(params) {
  return request({
    url: '/agents/count',
    params
  })
}
// 编辑
export function editagents(data) {
  return request({
    url: `/agents/${data.id}`,
    method: 'put',
    data
  })
}

